<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Platform_model extends MY_Model {

	public function fetch_all() {
		$data = $this->db->select('id,name,url')
				->from('platform')
				->get()
				->result_array();

		return $data;
	}

	public function add($data = NULL) {
		$query = $this->add_data('platform', $data);
		return $query;
	}

	public function edit($platform_id, $data) {
		$result = $this->db->update('platform', $data, array('id'=>$platform_id));
		return $result;
	}

	public function show($platform_id) {
		$rule = $this->db->get_where('platform', array('id' => $platform_id))
					->row_array();
		return $rule;
	}

}